Multi-Class Brain Tumor Classification from MRI Using ResNet50V2 Transfer Learning with Two-Stage Augmentation, Grad-CAM Explainability, and Cross-Dataset Validation
Authors: Shalma Muji M, Nithin T, Lavanya D, Abhiram VS, S Sreeja, A Kousalya
Brain tumor classification from magnetic resonance imaging (MRI) remains a challenging clinicaltaskduetointer-classvisualsimilarityandsignificantvari-ation across imaging protocols and acquisition equipment.Accurate and timely classification of glioma, meningioma, pituitary tumor, and normal brain tissue is critical for treatment planning and patient outcomes.This work proposes a two-phase transfer learning framework based on ResNet50V2 pretrained on ImageNetfor four-class brain MRI classification.A two-stage augmentation pipeline combin-ingofflinedegradationaugmentationGaussiannoise(SNR=18.39dB),Gaussianblur(SSIM?0.93),andresolutiondegradation(SSIM?0.85)—withonlinegeometric augmentation was employed to improve cross-scanner robustness. Class imbalance was addressed through balanced class weighting.Grad-CAM visualisa-tions were generated to provide anatomically interpretable explanations of model decisions.Evaluated on a held-out test set of 310 images from the Daneshmand dataset, the proposed model achieved 89.68% accuracy, Cohen’s ?=0.8595, and macro-AUCof0.9820. ExternalvalidationontheindependentCE-MRIdataset (n=394)yielded84.52%accuracyandmacro-AUCof0.9729, withMcNemar’s test confirming no statistically significant difference in error patterns (p=0.1882), demonstrating consistent cross-dataset generalisation. Grad-CAM activations con-firmed anatomically consistent focus across all four classes, supporting clinical in-terpretability.The complete implementation is publicly available at the project repository.
Introduction
This paper presents a deep learning framework for brain tumor classification from MRI images, aiming to improve accuracy, generalization, and clinical interpretability across four classes: glioma, meningioma, pituitary tumor, and normal brain.
Key motivation
Brain tumors are life-threatening and require early and accurate classification, but manual MRI interpretation is:
Time-consuming
Subject to inter-observer variation
Challenged by large imaging volumes
A major difficulty is that tumor types (especially glioma vs meningioma) often have visually similar MRI patterns, and datasets are typically imbalanced and limited.
Proposed method
The study introduces a transfer learning–based CNN approach using ResNet50V2, combined with a carefully designed training pipeline:
A two-stage augmentation system (noise, blur, resolution degradation, and geometric transforms) validated using SSIM, PSNR, and SNR to ensure clinical realism.
A fine-tuned ResNet50V2 model with transfer learning:
First trained with frozen layers
Then fine-tuned on deeper layers
Class imbalance handling using weighted loss functions
Grad-CAM explainability to visualize which brain regions influenced predictions
Dataset and validation
Primary dataset: 3,096 MRI images
External validation: 394 images (CE-MRI dataset)
Strict train/validation/test split with no data leakage
Strong generalization (minimal AUC drop of ~0.009)
Key findings
Best performance achieved for normal and pituitary classes
Main errors occur between glioma and meningioma, due to overlapping imaging features
Grad-CAM shows the model focuses on clinically meaningful brain regions
Statistical tests confirm stable and consistent generalization across datasets
Comparison with prior work
The model performs competitively with or better than earlier CNN, SVM, and transfer learning approaches, with a key advantage being:
External dataset validation
Augmentation quality validation
Explainable AI (Grad-CAM)
Limitations
Uses 2D MRI slices (no 3D context)
Relies on only T1-weighted scans (limited anatomical detail)
Training data is from a single source
No prospective real-world clinical deployment yet
Conclusion
AtwophaseResNet50V2transferlearningframeworkwaspresentedforfourclassbrainMRItumorclassification,achieving89.68%accuracy, ?=0.8595, andmacro-AUC0.9820 on a strictly held-out internal test set. External validation on the independent CE-MRI benchmarkachieved84.52%accuracyandmacroAUC0.9729,withMcNemar’stestconfirmingnostatisticallysignificantdifferenceinerrorpatterns(p=0.1882), demonstrating consistent cross-dataset generalisation.Five principal contributions were demonstrated: quantitatively validated two-stage augmentation with mathematical formulation, two-phase transfer learning with progressive fine-tuning, balanced class weighting, anatomi-cally consistent Grad-CAM explainability with formal derivation, and statistically vali-dated external cross-dataset generalisation.
References
[1] D. N. Louis et al., “The 2021 WHO Classification of Tumors of the Central Nervous System:asummary,”Neuro-Oncology,vol.23,no.8,pp.1231–1251,2021.
[2] Q.T.Ostrometal.,“CBTRUSStatisticalReport:PrimaryBrainandOtherCen-tral Nervous System Tumors Diagnosed in the United States in 2014–2018,” Neuro-Oncology, vol. 23, no. S3, pp. iii1–iii105, 2021.
[3] D. N. Louis et al., “The 2016 World Health Organization Classification of Tumors ofthe Central Nervous System,” Acta Neuropathologica, vol. 131, no. 6, pp. 803–820, 2016.
[4] A. Salehi, A. Ahmadi, and I. Heidari, “A brief survey on deep learning based brain tumor detection,” arXiv preprint arXiv:2007.01169, 2020.
[5] C. Shorten and T. M. Khoshgoftaar,“A survey on image data augmentation fordeep learning,” Journal of Big Data, vol. 6, no. 1, pp. 1–48, 2019.
[6] J.Chengetal.,“Enhancedperformanceofbraintumorclassificationviatumor regionaugmentationandpartition,”PLOSONE,vol.10,no.10,p.e0140381,2015.
[7] N.Abiwinanda,M.Hanif,S.T.Hesaputra,A.Handayani,andT.R.Mengko,“Brain tumorclassificationusingconvolutionalneuralnetwork,”inWorldCongressonMed-ical Physics and Biomedical Engineering, Singapore:Springer, 2019, pp. 183–189.
[8] A. Pashaei, H. Sajedi, and N. Jazayeri, “Brain tumor classification via convolutional neural network and extreme learning machines,” in Proc. 8th Int. Conf. Computer and Knowledge Engineering (ICCKE), 2018, pp. 314–319.
[9] S.DeepakandP.M.Ameer,“BraintumorclassificationusingdeepCNNfeatures via transfer learning,”ComputersinBiologyandMedicine,vol. 111,p. 103345,2019.
[10] M. A. Khan et al., “Brain tumor detection and classification using MRI: a cross-sectional study,” Computational and Mathematical Methods in Medicine, vol. 2020,
[11] p.6276735,2020.
[12] A. Rehman, S. Naz, M. I. Razzak, F. Akram, and M. Imran, “A deep learning-based framework for automatic brain tumor classification using transfer learning,” Circuits, Systems,andSignalProcessing,vol.39,no.2,pp.757–775,2020.
[13] H. H. Sultan, N. M. Salem, and W. Al-Atabany, “Multi-classification of brain tumor imagesusingdeepneuralnetwork,”IEEEAccess,vol.7,pp.69215–69225,2019.
[14] S.Daneshmand,“BrainMRIImagesforBrainTumorDetection,”Kaggle,2020. [Online]. Available: https://www.kaggle.com/datasets/susandaneshmand/mri-images
[15] S.Chakrabarty,“BrainTumorClassification(MRI),”Kaggle,2019.[On-line].Available: https://www.kaggle.com/datasets/sartajbhuvaji/brain-tumor-classification-mri
[16] K.He, X.Zhang, S.Ren, andJ.Sun, “Identitymappingsindeepresidualnetworks,” in Proc. ECCV, Amsterdam, 2016, pp. 630–645.
[17] R.R.Selvarajuetal.,“Grad-CAM:Visualexplanationsfromdeepnetworksvia gradient-based localization,” in Proc. ICCV, Venice, 2017, pp. 618–626.
[18] D.P.KingmaandJ.Ba,“Adam:Amethodforstochasticoptimization,”inProc. ICLR, 2015.
[19] J. R. Landis and G. G. Koch, “The measurement of observer agreement for categor-ical data,” Biometrics, vol. 33, no. 1, pp. 159–174, 1977.
[20] S.Muji,“MRIBrainTumorClassification,”Kaggle,2025.[Online].Available:https://www.kaggle.com/code/shalmamuji/mri-brain-tumor-classification